<template>
  <div class="home">
   <h1>hi,home</h1>
   <h2>路由query传参——-----{{ $route.query.username }}------{{ $route.query. age}}</h2>
   <h2>路由params传参-----{{ $route.params.password }}------{{ $route.params.password }}</h2>
  </div>
</template>

<script>
export default{
  data(){
    return{

    }
  },
  created(){
    // 路由跳转 接收数据
    // this.$router 存储当前组件信息
    console.log(this.$route)
    //接收query传参
    console.log(this.$route.query.username);

    // 接收params传参
    console.log(this.$route.params.like  )
  },
}
</script>
